/* 
 * File:   String.h
 * Author: Zeeno
 *
 * Created on 4. březen 2012, 8:39
 */

#ifndef VERTIGO_CORE_STRING_STRING_H
#define	VERTIGO_CORE_STRING_STRING_H


#include <bits/basic_string.h>

#include "../types.h"

namespace vertigo {
    
    typedef std::basic_string<Uint32> u8string;

    class String : public u8string {
    public:
    public:
        String();
        String(const String& orig);
        String(std::string);
        String(const char *);
        virtual ~String();

        //        String& operator=();

        //Iterators
        //begin();
        //end();
        //rbegin();
        //rend();

        /**
         * Return length of string
         * Returns a count of the number of characters in the string.
         * String::length is an alias of String::size, returning both the exact same value.
         * @return 
         */
        size_t size() const;

        /**
         * Return length of string
         * Returns a count of the number of characters in the string.
         * String::length is an alias of String::size, returning both the exact same value.
         * @return 
         */
        size_t length() const;

        /**
         * Return maximum size of string
         * Returns the maximum number of characters that the string object can hold.
         * @return The maximum number of characters a string object can have as its content.
         */
        size_t max_size() const;

        /**
         * Resize string.
         * If new size is bigger than old size, the rest of string is filled by 0
         * @param new size of string
         * @return itself
         */
        String& resize(size_t);

        /**
         * Resize string
         * @param size_t new size of string
         * @param Character filling character if new size is bigger than old size
         * @return itself
         */
        String& resize(size_t, Character);

        /**
         * Return size of allocated storage
         * @return size
         */
        size_t capacity();

        /**
         * Request a change in capacity
         * @return itself
         */
        String& reserve(size_t);

        /**
         * Clear String
         * @return itself
         */
        String& clear();

        /**
         * Test if string is empty
         * @return <b>true</b> if String is not empty, <b>else</b> otherwise
         */
        bool empty();

    private:
    };

}
#endif	/* VERTIGO_CORE_STRING_STRING_H */

